<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.*" %>

<html>
    <head>
        <title>config</title>
    </head>
    <body>

        <p>
            用JSP表达式获得 servlet name : <%= config.getServletName() %>
        </p>

        <p>
            用JSP表达式获得 application : <%= config.getServletContext() %>
        </p>

        <hr>

        <%
            Enumeration<String> initParamNames = config.getInitParameterNames();
            Iterator<String> itor = initParamNames.asIterator();
            while( itor.hasNext() ) {
                String name = itor.next();
                String value = config.getInitParameter( name );
        %>
        <p>
            <%= name %> : <%= value %>
        </p>
        <% } %>

    </body>
</html>
